From 623d0cfab45a815b8d66262ef2debc58437d34dc Mon Sep 17 00:00:00 2001 From: oliskoli Date: Sun, 17 Aug 2008 21:29:48 +0000 Subject: [PATCH] destinator: Check result of first gbfread. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3356 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/destinator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gpsbabel/destinator.c b/gpsbabel/destinator.c index 7ddac676c..ce88a0961 100644 --- a/gpsbabel/destinator.c +++ b/gpsbabel/destinator.c @@ -340,7 +340,9 @@ destinator_read(void) double d0, d1; char buff[16]; - gbfread(buff, sizeof(buff), 1, fin); + if (! gbfread(buff, 1, sizeof(buff), fin)) + fatal(MYNAME ": Unexpected EOF (end of file)!\n"); + i0 = le_read32(&buff[0]); i1 = le_read32(&buff[4]); -- 2.30.2